$-editor-messages-margin-x: 2%;
%o-editor-messages {
    width: 100% - $-editor-messages-margin-x * 2; // Need to be forced here to avoid flickering
    margin: 20px $-editor-messages-margin-x;
    border: 2px dashed $o-we-color-text-normal;
    padding: 112px 0px;
    text-align: center;
    color: $o-we-color-text-normal;

    &:before {
        content: attr(data-editor-message);
        display: block;
        font-size: 20px;
    }
    &:after {
        content: attr(data-editor-sub-message);
        display: block;
    }
}

.o_editable {
    &:not(:empty), &[data-oe-type] {
        &:not([data-oe-model="ir.ui.view"]):not([data-oe-type="html"]):not([data-oe-type="image"]):hover,
        &.o_editable_date_field_linked {
            box-shadow: $o-brand-odoo 0 0 5px 2px inset;
        }
        &[data-oe-type="image"]:hover {
            position: relative;

            &:after {
                content: "";
                pointer-events: none;
                position: absolute;
                z-index: 1;
                top: 0px;
                left: 0px;
                right: 0px;
                bottom: 0px;
                box-shadow: $o-brand-odoo 0 0 5px 2px inset;
            }
        }
    }
    &:focus, &[data-oe-type] {
        min-height: 0.8em;
        min-width: 8px;
    }
    &.o_is_inline_editable {
        display: inline-block;
    }
    .btn, &.btn {
        -webkit-user-select: auto;
        -moz-user-select: auto;
        -ms-user-select: auto;
        user-select: auto;
        cursor: text!important;
    }
    /* Summernote not Support for placeholder text https://github.com/summernote/summernote/issues/581 */
    &[placeholder]:empty:not(:focus):before {
        content: attr(placeholder);
        opacity: 0.3;
    }

    &.oe_structure.oe_empty, &[data-oe-type=html] {
        &:empty {
            @extend %o-editor-messages;
        }
        > .oe_drop_zone.oe_insert:not(.oe_vertical):only-child {
            @extend %o-editor-messages;
            height: auto;
            color: $o-brand-odoo;
        }
        > p:empty:only-child {
            color: #aaa;
        }
    }
}
.editor_enable [data-oe-readonly]:hover {
    cursor: default;
}

/* Prevent the text contents of draggable elements from being selectable. */
[draggable] {
    user-select: none;
}

.oe_editable:focus,
.css_editable_hidden,
.editor_enable .css_editable_mode_hidden {
    outline: none!important;
}

.editor_enable .css_non_editable_mode_hidden,
.o_editable .media_iframe_video .css_editable_mode_display {
    display: block!important;
}

// TODO: in master check if the class / rule is relevant at all
.editor_enable [data-oe-type=html].oe_no_empty:empty {
    height: 16px!important;
}

// EDITOR BAR
table.editorbar-panel {
    cursor: pointer;
    width: 100%;
    td { border: 1px solid #aaa}
    td.selected { background-color: #b1c9d9}
}
.link-style {
    .dropdown > .btn {
        min-width: 160px;
    }
    .link-style {
        display: none;
    }
    li {
        text-align: center;
        label {
            width: 100px;
            margin: 0 5px;
        }
    }
    .col-md-2 > * {
        line-height: 2em;
    }
}

// fontawesome
.note-editable .fa {
    cursor: pointer;
}

// parallax dropzones are in conflict with outside of parallax dropzones
.parallax .oe_structure > .oe_drop_zone {
    &:first-child {
        top: 16px;
    }
    &:last-child {
        bottom: 16px;
    }
}

.editor_enable .js_language_selector {
    display: none;
}

// Facebook Page
.editor_enable .o_facebook_page:not(.o_facebook_preview) {
    iframe {
        pointer-events: none;
    }
    .o_facebook_alert .o_add_facebook_page {
        cursor: pointer;
    }
}
